package com.example.thegreatwall.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.util.Date;
import java.sql.Time;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

@Data
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "product_detail")
public class ProductDetail {
    /**
     * 产品明细id
     */
    @TableId(value = "product_detail_id", type = IdType.AUTO)
    private Integer productDetailId;

    /**
     * 产品明细
     */
    @TableField(value = "pd_name")
    private String pdName;

    /**
     * 价格
     */
    @TableField(value = "pd_price")
    private Double pdPrice;

    /**
     * 修改时间
     */
    @TableField(value = "update_at")
    private Date updateAt;

    /**
     * 剩余库存
     */
    @TableField(value = "inventory")
    private Long inventory;

    /**
     * 状态（0 - 下架，1 - 正常，2 - 库存不足）
     */
    @TableField(value = "`status`")
    private Byte status;

    /**
     * 0-单个商品 1-组合套餐
     */
    @TableField(value = "product_type")
    private Integer productType;

    /**
     * 关联商品表id
     */
    @TableField(value = "product_id")
    private Integer productId;

    /**
     * 开园时间
     */
    @TableField(value = "playtime")
    private Date playtime;

    /**
     * 闭园时间
     */
    @TableField(value = "endplaytime")
    private Date endplaytime;

    /**
     * 购票规则
     */
    @TableField(value = "rule")
    private int rule;


    @TableField(value = "cover_image", exist = false)
    private String coverImage;

    @TableField(exist = false)
    private Order order;

    @TableField(value = "p_id")
    private String pId;


}